<template>
	<view class="box">
		<view class="title sty">
			<text class="t-left">健康报告</text>
			<text class="t-right fs">{{item.createTime}}</text>
		</view>
		<view class="bottom sty">
			<text class="b-left fs">身高: {{item.height}}cm/体重: {{item.weight}}kg</text>
			<view class="b-right">
				<button @click="toHealthDetail" size="mini" class="btn">查看</button>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "healthItem",
		props: {
			item: {
				type: Object,
				required: true
			}
		},
		data() {
			return {

			};
		},
		methods: {
			toHealthDetail() {
				wx.navigateTo({
					url: `/subPackages/healthDetail/healthDetail?id=${this.item.id}`
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.box {
		background-color: #fff;
		border-radius: 10rpx;
		padding: 0 40rpx;
		margin-bottom: 20rpx;

		.sty {
			display: flex;
			justify-content: space-between;
			padding: 15rpx 0;
			align-items: center;
		}

		.fs {
			color: #828282;
			font-size: 28rpx
		}

		.title {}

		.bottom {}
	}

	.btn {
		border: 2rpx solid #37b9f3;
		color: #37b9f3;
		border-radius: 31rpx;
		background-color: #fff;
	}
</style>
